import HttpRequest from "@/lib/axios.js";

class TeamModel extends HttpRequest {
  constructor() {
    super();
  }
  /* 添加团队成员 */
  _addMember({ name, mobile, type }) {
    return this.req({
      url: "group/addMember",
      method: "post",
      data: {
        name,
        mobile,
        type
      }
    });
  }
  /* 获取团队成员列表 */
  _getMemberList({ curpage = 1, pagesize = 9999, type }) {
    return this.req({
      url: "group/getMemberList",
      method: "post",
      data: {
        curpage,
        pagesize,
        type
      }
    });
  }
  /* 添加团队成员购买记录 */
  _addGroupMemberOrder({ count, amount, group_member_id }) {
    return this.req({
      url: "group/addGroupMemberOrder",
      method: "post",
      data: {
        count,
        amount,
        group_member_id
      }
    });
  }
  /* 获取团队成员购买记录列表 */
  _getGroupMemberOrderList({ curpage = 1, pagesize = 9999, group_member_id }) {
    return this.req({
      url: "group/getGroupMemberOrderList",
      method: "post",
      data: {
        curpage,
        pagesize,
        group_member_id
      }
    });
  }
}

export default TeamModel;
